﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TPOJ.Core;

namespace stub
{
    class Program
    {
        static void Main(string[] args)
        {
            Environment.SetEnvironmentVariable("path", Environment.GetEnvironmentVariable("path") + @";C:\Users\lehope\Documents\Visual Studio 2010\Projects\TPOJ\stub\Config\C#\;");
            Language lang = new Language("C#");
            Engine engine = new Engine(@"..\..\Sources\lehope\1000.cs", @"..\..\Outputs\", @"..\..\Tests\1000\", lang, 1000, 1000);
            Result r = engine.Judge();

            Console.WriteLine(r.ResultType);
            Console.WriteLine(r.ErrorMessage);
            Console.WriteLine(r.Memory);
            Console.WriteLine(r.Time);

            //Compiler compiler = new Compiler(@"..\..\Sources\lehope\1000.cs", @"..\..\Outputs\1000.exe", lang);
            //r = compiler.Compile();
            //System.Console.WriteLine(r.ErrorMessage);
            //System.Console.WriteLine(Environment.GetEnvironmentVariable("path"));
            //System.Console.WriteLine(r.ResultType);
            //System.Console.WriteLine("=========================================");
            //Runner runner = new Runner(@"..\..\Tests\1000\1000-1.in", @"..\..\Outputs\1000\1000-1.out", @"..\..\Outputs\1000.exe", 1000, 1000, lang);
            //Result rr = runner.Run();
            //System.Console.WriteLine(rr.ErrorMessage);
            //System.Console.WriteLine(rr.ResultType);
            //Comparer comparer = new Comparer(@"..\..\Tests\1000\1000-1.out", @"..\..\Outputs\1000\1000-1.out");
            //Result rrr = comparer.Compare();
            //System.Console.WriteLine(rrr.ErrorMessage);
            //System.Console.WriteLine(rrr.ResultType);

            System.Console.ReadLine();
        }
    }
}
